<html>
<head><meta charset="utf-8"><title>Crate import suggestions when? · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Crate.20import.20suggestions.20when.3F.html">Crate import suggestions when?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="234404063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Crate%20import%20suggestions%20when%3F/near/234404063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Crate.20import.20suggestions.20when.3F.html#234404063">(Apr 13 2021 at 21:19)</a>:</h4>
<p><a href="https://deno.com/blog/v1.9#import-completions-in-the-lsp">https://deno.com/blog/v1.9#import-completions-in-the-lsp</a></p>
<p>So when is RA going to offer <code>use |</code> completion to every crate on <a href="http://crates.io">crates.io</a>? <span aria-label="innocent" class="emoji emoji-1f607" role="img" title="innocent">:innocent:</span></p>



<a name="234404404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Crate%20import%20suggestions%20when%3F/near/234404404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Andrew Chin (eminence) <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Crate.20import.20suggestions.20when.3F.html#234404404">(Apr 13 2021 at 21:22)</a>:</h4>
<p>We'd probably need to have working completion in Cargo.toml first <span aria-label="grinning face with smiling eyes" class="emoji emoji-1f601" role="img" title="grinning face with smiling eyes">:grinning_face_with_smiling_eyes:</span></p>



<a name="234406784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Crate%20import%20suggestions%20when%3F/near/234406784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Crate.20import.20suggestions.20when.3F.html#234406784">(Apr 13 2021 at 21:41)</a>:</h4>
<p>I believe this is currently blocked on having a good lossless TOML parser (preferably based on rowan I suppose?)</p>



<a name="234409692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Crate%20import%20suggestions%20when%3F/near/234409692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Crate.20import.20suggestions.20when.3F.html#234409692">(Apr 13 2021 at 22:06)</a>:</h4>
<p>I like it when my troll-ish suggestions are actually already being worked on in some fashion.</p>



<a name="234410439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Crate%20import%20suggestions%20when%3F/near/234410439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Crate.20import.20suggestions.20when.3F.html#234410439">(Apr 13 2021 at 22:14)</a>:</h4>
<p>i mean, intellij has cargo.toml completion</p>



<a name="234412603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Crate%20import%20suggestions%20when%3F/near/234412603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lukas Wirth <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Crate.20import.20suggestions.20when.3F.html#234412603">(Apr 13 2021 at 22:37)</a>:</h4>
<p>@_<strong>Jonas Schievink  [he&#x2F;him]|211727</strong> <a href="#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Crate.20import.20suggestions.20when.3F/near/234406784">said</a>:</p>
<blockquote>
<p>I believe this is currently blocked on having a good lossless TOML parser (preferably based on rowan I suppose?)</p>
</blockquote>
<p>There is this <a href="https://github.com/tamasfe/taplo/tree/master/taplo">https://github.com/tamasfe/taplo/tree/master/taplo</a> which is using rowan, but I don't know if this parser fits for our purposes</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>